  //1.window.onscroll事件中编码
  window.onscroll = function () {
    //2.获取当前滚动距离document.documentElement.scrollTop
    var top = document.documentElement.scrollTop
    //3.1判断滚动距离 >= 168, 修改nav定位样式->fixed
    if (top >= 1) {
        document.getElementById('ahead').style.position = 'fixed'
        document.getElementById('ahead').style.top = 0
        document.getElementById('ahead').style.left = 0
    } else {
        document.getElementById('ahead').style.position = 'static'
        document.getElementById('ahead').style = 'static'
    }
    //3.2,修改nav定位样式恢复正常方式
}
// function pageScroll() {
//     window.scrollBy(0, -70);
//     scrolldelay = setTimeout('pageScroll()', 70);
//     var sTop = document.documentElement.scrollTop + document.body.scrollTop;
//     if (sTop == 0) clearTimeout(scrolldelay);
// }